#include <functional>

using func = std::function<void (int)>;

class Task
{
public:
    Task()
    {
    }

    Task(int sockId, func fun)
        : _sockId(sockId), _func(fun)
    {
    }

    void operator()()
    {
        _func(_sockId);
    }

public:
    int _sockId;
    func _func;
};